package com.shqcjd.yunweiyanoperator.ui.adapter;

import android.view.View;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.shqcjd.yunweiyanoperator.R;
import com.shqcjd.yunweiyanoperator.model.pojo.CompanyBean;
import com.shqcjd.yunweiyanoperator.model.pojo.DepartmentBean;

import java.util.List;

import butterknife.BindView;
import butterknife.ButterKnife;

/**
 * 部门
 */
public class DepartmentAdapter extends BaseQuickAdapter<DepartmentBean.ListBean, DepartmentAdapter.ViewHolder> {


    public DepartmentAdapter() {
        super(R.layout.item_department_list);
    }

    @Override
    protected void convert(ViewHolder helper, DepartmentBean.ListBean item) {
        helper.tv_name.setText(item.departmentName);

        helper.addOnClickListener(R.id.right);
        helper.addOnClickListener(R.id.content);
    }

    class ViewHolder extends BaseViewHolder {
        @BindView(R.id.tv_name)
        TextView tv_name;
        @BindView(R.id.right)
        RelativeLayout right;
        @BindView(R.id.content)
        LinearLayout content;
        public ViewHolder(View view) {
            super(view);
            ButterKnife.bind(this, view);
        }
    }
}
